<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT">










<meta name="description" content="&amp;#x524D;&amp;#x8A00;&amp;#xFF1A;   &amp;#x5728;&amp;#x5199;&amp;#x8FD9;&amp;#x7BC7;&amp;#x6587;&amp;#x7AE0;&amp;#x4E4B;&amp;#x524D;&amp;#x5148;&amp;#x5410;&amp;#x69FD;&amp;#x4E00;&amp;#x4E0B;&amp;#x81EA;&amp;#x5DF1;&amp;#x7684;&amp;#x82F1;&amp;#x6587;&amp;#x6C34;&amp;#x5E73;&amp;#xFF0C;&amp;#x4E">
<meta property="og:type" content="article">
<meta property="og:title" content="Android Facebook 原生登录">
<meta property="og:url" content="http://yoursite.com/2019/07/17/Android Facebook原生登录/index.html">
<meta property="og:site_name" content="Silence潇湘夜雨">
<meta property="og:description" content="&amp;#x524D;&amp;#x8A00;&amp;#xFF1A;   &amp;#x5728;&amp;#x5199;&amp;#x8FD9;&amp;#x7BC7;&amp;#x6587;&amp;#x7AE0;&amp;#x4E4B;&amp;#x524D;&amp;#x5148;&amp;#x5410;&amp;#x69FD;&amp;#x4E00;&amp;#x4E0B;&amp;#x81EA;&amp;#x5DF1;&amp;#x7684;&amp;#x82F1;&amp;#x6587;&amp;#x6C34;&amp;#x5E73;&amp;#xFF0C;&amp;#x4E">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2019-07-19T05:34:17.418Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Android Facebook 原生登录">
<meta name="twitter:description" content="&amp;#x524D;&amp;#x8A00;&amp;#xFF1A;   &amp;#x5728;&amp;#x5199;&amp;#x8FD9;&amp;#x7BC7;&amp;#x6587;&amp;#x7AE0;&amp;#x4E4B;&amp;#x524D;&amp;#x5148;&amp;#x5410;&amp;#x69FD;&amp;#x4E00;&amp;#x4E0B;&amp;#x81EA;&amp;#x5DF1;&amp;#x7684;&amp;#x82F1;&amp;#x6587;&amp;#x6C34;&amp;#x5E73;&amp;#xFF0C;&amp;#x4E">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2019/07/17/Android Facebook原生登录/">





  <title>Android Facebook 原生登录 | Silence潇湘夜雨</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Silence潇湘夜雨</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">Android开发一枚</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home //首页"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user //关于"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags  //标签"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th //分类"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive //归档"></i> <br>
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-schedule">
          <a href="/schedule/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-calendar //日程表"></i> <br>
            
            日程表
          </a>
        </li>
      
        
        <li class="menu-item menu-item-sitemap">
          <a href="/sitemap.xml" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-sitemap //站点地图"></i> <br>
            
            站点地图
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/07/17/Android Facebook原生登录/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Silence潇湘夜雨">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Silence潇湘夜雨">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Android Facebook 原生登录</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-07-17T18:17:05+08:00">
                2019-07-17
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/登录/" itemprop="url" rel="index">
                    <span itemprop="name">登录</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1k
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  6
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="&#x524D;&#x8A00;&#xFF1A;"><a href="#&#x524D;&#x8A00;&#xFF1A;" class="headerlink" title="&#x524D;&#x8A00;&#xFF1A;"></a>&#x524D;&#x8A00;&#xFF1A;</h3><pre><code>   &#x5728;&#x5199;&#x8FD9;&#x7BC7;&#x6587;&#x7AE0;&#x4E4B;&#x524D;&#x5148;&#x5410;&#x69FD;&#x4E00;&#x4E0B;&#x81EA;&#x5DF1;&#x7684;&#x82F1;&#x6587;&#x6C34;&#x5E73;&#xFF0C;&#x4E4B;&#x524D;&#x4E00;&#x76F4;&#x6CA1;&#x611F;&#x89C9;&#xFF0C;&#x56E0;&#x4E3A;&#x505A;&#x7684;&#x9879;&#x76EE;&#x90FD;&#x662F;&#x56FD;&#x5185;&#x7684;&#x9879;&#x76EE;&#xFF0C;&#x5F88;&#x5C11;&#x770B;&#x82F1;&#x6587;&#x6587;&#x6863;&#x3002;&#x4F46;&#x662F;&#xFF0C;&#x81EA;&#x4ECE;&#x6362;&#x4E86;&#x4E00;&#x4E2A;&#x5DE5;&#x4F5C;&#x4E4B;&#x540E;&#xFF0C;
&#x505A;&#x7684;&#x662F;&#x56FD;&#x5916;&#x7684;&#x9879;&#x76EE;&#x3002;&#x5E76;&#x4E14;&#xFF0C;&#x5199;&#x4E86;&#x7ED9;&#x7B2C;&#x4E09;&#x65B9;&#x5199;&#x4E86;&#x4E00;&#x4E2A;SDK&#xFF0C;&#x9700;&#x8981;&#x4F7F;&#x7528;Google&#x767B;&#x5F55;&#x548C;Facebook&#x767B;&#x5F55;&#x3002;&#x90A3;&#x4E48;&#xFF0C;&#x5C31;&#x5FC5;&#x987B;&#x7528;&#x539F;&#x751F;&#x767B;&#x5F55;&#xFF0C;&#x8BF4;&#x5230;&#x539F;&#x751F;&#x767B;&#x5F55;&#xFF0C;&#x90A3;&#x4E48;&#x5C31;&#x9003;&#x4E0D;&#x6389;&#x8981;&#x770B;
&#x82F1;&#x6587;&#x6587;&#x6863;&#x3002;&#x770B;&#x4E86;&#x82F1;&#x6587;&#x6587;&#x6863;&#x4E4B;&#x540E;&#x624D;&#x611F;&#x89C9;&#x81EA;&#x5DF1;&#x7684;&#x82F1;&#x6587;&#x662F;&#x591A;&#x4E48;&#x7684;&#x5DEE;&#x52B2;&#x3002;&#x597D;&#x4E86;&#xFF0C;&#x5E9F;&#x8BDD;&#x4E0D;&#x591A;&#x8BF4;&#xFF0C;&#x6211;&#x4EEC;&#x8FDB;&#x5165;&#x4ECA;&#x5929;&#x7684;&#x6B63;&#x9898;&#x3002;&#x5982;&#x4F55;&#x4F7F;&#x7528;Facebook&#x767B;&#x5F55;&#x3002;</code></pre><h3 id="&#x9996;&#x5148;"><a href="#&#x9996;&#x5148;" class="headerlink" title="&#x9996;&#x5148;"></a>&#x9996;&#x5148;</h3><p>   &#x5F53;&#x7136;&#x662F;&#x67E5;&#x770B;<a href="https://developers.facebook.com/docs/facebook-login/android" target="_blank" rel="noopener">&#x5B98;&#x65B9;&#x6587;&#x6863;</a>&#x4E86;&#xFF0C;&#x5B98;&#x65B9;&#x6587;&#x6863;&#x4ECB;&#x7ECD;&#x7684;&#x5F88;&#x6E05;&#x695A;&#xFF0C;&#x5E76;&#x4E14;&#x66F4;&#x65B0;&#x6BD4;&#x8F83;&#x53CA;&#x65F6;&#x3002;&#x5982;&#x679C;&#x4F60;&#x4E0D;&#x592A;&#x60F3;&#x770B;&#x82F1;&#x6587;&#x6587;&#x6863;&#xFF0C;&#x800C;&#x53BB;&#x5404;&#x79CD;&#x767E;&#x5EA6;&#x3002;&#x90A3;&#x4E48;&#xFF0C;&#x4F60;&#x53EF;&#x80FD;&#x4F1A;&#x9047;&#x5230;&#x5404;&#x79CD;&#x5404;&#x6837;&#x7684;&#x95EE;&#x9898;&#x3002;</p>
<ul>
<li><p>1&#x3001;&#x5F15;&#x5165;Facebook&#x7684;&#x5728;&#x7EBF;&#x4F9D;&#x8D56;</p>
<pre><code>//facebook&#x767B;&#x5F55;
implementation &apos;com.facebook.android:facebook-login:4.39.0&apos;</code></pre></li>
<li><p>2&#x3001;&#x5728;&#x6E05;&#x5355;&#x6587;&#x4EF6;&#x4E2D;&#x914D;&#x7F6E;&#x5728;Facebook&#x7533;&#x8BF7;&#x7684; appID&#x548C;scheme</p>
<pre><code>&lt;!-- facebook&#x767B;&#x5F55; --&gt;
  &lt;meta-data
      android:name=&quot;com.facebook.sdk.ApplicationId&quot;
      android:value=&quot;@string/facebook_app_id&quot; /&gt;

  &lt;activity
      android:name=&quot;com.facebook.FacebookActivity&quot;
      android:configChanges=&quot;keyboard|keyboardHidden|screenLayout|screenSize|orientation&quot;
      android:label=&quot;@string/app_name&quot; /&gt;
  &lt;activity
      android:name=&quot;com.facebook.CustomTabActivity&quot;
      android:exported=&quot;true&quot;&gt;
      &lt;intent-filter&gt;
          &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;

          &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
          &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;

          &lt;data android:scheme=&quot;@string/fb_login_protocol_scheme&quot; /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;</code></pre><p><strong>&#x6CE8;&#x610F;&#xFF1A;</strong> &#x4E0A;&#x9762;&#x7684; @string/facebook_app_id &#x6362;&#x6210;&#x4F60;&#x5728;facebook&#x7533;&#x8BF7;&#x7684;AppID&#xFF0C;@string/fb_login_protocol_scheme &#x6362;&#x6210;Facebook&#x7ED9;&#x4F60;&#x5206;&#x914D;&#x7684;scheme&#x3002;</p>
</li>
</ul>
<h3 id="&#x5176;&#x6B21;"><a href="#&#x5176;&#x6B21;" class="headerlink" title="&#x5176;&#x6B21;"></a>&#x5176;&#x6B21;</h3><pre><code>&#x4E0A;&#x9762;&#x7684;&#x914D;&#x7F6E;&#x7B97;&#x662F;&#x641E;&#x5B9A;&#x4E86;&#xFF0C;&#x90A3;&#x4E48;&#x5C31;&#x662F;&#x4EE3;&#x7801;&#x7684;&#x7F16;&#x5199;&#x4E86;&#xFF0C;&#x6211;&#x8FD9;&#x91CC;&#x4E3A;&#x4E86;&#x65B9;&#x4FBF;&#xFF0C;&#x6240;&#x4EE5;&#x5C01;&#x88C5;&#x4E86;&#x4E00;&#x4E2A;Facebook&#x767B;&#x5F55;&#x7C7B;&#x3002;</code></pre><ul>
<li><p>1&#x3001;&#x9996;&#x5148;&#x770B;&#x5DE5;&#x5177;&#x7C7B;&#x7684;&#x5C01;&#x88C5;</p>
<p>1)&#x3001;Facebook&#x767B;&#x5F55;&#x5C01;&#x88C5;&#x7C7B;<br>&#x200B;<br>&#x200B;     private static CallbackManager mFaceBookCallBack;<br>&#x200B;     private static FaceBookLoginManager sInstance;<br>&#x200B;<br>&#x200B;     private FaceBookLoginManager() {<br>&#x200B;<br>&#x200B;     }<br>&#x200B;<br>&#x200B;    /**<br>&#x200B;     * &#x5355;&#x4F8B;<br>&#x200B;     *<br>&#x200B;     * @return<br>&#x200B;     */<br>&#x200B;    public static FaceBookLoginManager getInstance() {<br>&#x200B;        if (sInstance == null) {<br>&#x200B;            synchronized (FaceBookLoginManager.class) {<br>&#x200B;                if (sInstance == null) {<br>&#x200B;                    sInstance = new FaceBookLoginManager();<br>&#x200B;    </p>
<pre><code>    }
}</code></pre><p>   }<br>   return sInstance;<br>}</p>
</li>
</ul>
<pre><code>/**
 * &#x5F00;&#x59CB;
 *
 * @param context
 */
public void faceBookLogin(Context context) {
    LoginManager.getInstance()
            .logInWithReadPermissions((Activity) context,
                    Arrays.asList(&quot;public_profile&quot;));
}


/**
 * &#x521D;&#x59CB;&#x5316;
 */
public void initFaceBook(final Context context,
                          final OnLoginSuccessListener mListener) {
    mFaceBookCallBack = CallbackManager.Factory.create();
    if (mFaceBookCallBack != null) {
        LoginManager.getInstance().registerCallback(mFaceBookCallBack,
                new FacebookCallback&lt;LoginResult&gt;() {
                    @Override
                    public void onSuccess(LoginResult loginResult) {
                        if (loginResult != null) {
                           if(mListener=null){
                            mListener.onSuccess(result);
                                }

                        }

                    }

                    @Override
                    public void onCancel() {
                       if(mListener=null){
                            mListener.onCancel();
                                }
                    }

                    @Override
                    public void onError(FacebookException error) {
                       if(mListener=null){
                            mListener.onError(error);
                                }
                    }
                });

    }
}


/**
 * &#x8BBE;&#x7F6E;&#x767B;&#x5F55;&#x7ED3;&#x679C;&#x56DE;&#x8C03;
 *
 * @param requestCode &#x8BF7;&#x6C42;&#x7801;
 * @param resultCode  &#x7ED3;&#x679C;&#x7801;
 * @param data        &#x6570;&#x636E;
 */
public void setOnActivityResult(int requestCode, int resultCode, Intent data) {
    if (mFaceBookCallBack != null) {
        mFaceBookCallBack.onActivityResult(requestCode, resultCode, data);
    }
}</code></pre><p>2&#xFF09;&#x3001;&#x63A5;&#x53E3;</p>
<pre><code>public interface OnLoginSuccessListener {

void OnSuccess(LoginResult result);

void onCancel();

void onError(FacebookException error);
}</code></pre><p>3&#xFF09;&#x3001;LoginResult &#x7C7B;</p>
<pre><code>public class LoginResult {
private final AccessToken accessToken;
private final Set&lt;String&gt; recentlyGrantedPermissions;
private final Set&lt;String&gt; recentlyDeniedPermissions;

/**
 * The constructor.
 *
 * @param accessToken                The new access token.
 * @param recentlyGrantedPermissions The recently granted permissions.
 * @param recentlyDeniedPermissions  The recently denied permissions.
 */
public LoginResult(
        AccessToken accessToken,
        Set&lt;String&gt; recentlyGrantedPermissions,
        Set&lt;String&gt; recentlyDeniedPermissions) {
    this.accessToken = accessToken;
    this.recentlyGrantedPermissions = recentlyGrantedPermissions;
    this.recentlyDeniedPermissions = recentlyDeniedPermissions;
}

/**
 * Getter for the new access token.
 * @return the new access token.
 */
public AccessToken getAccessToken() {
    return accessToken;
}

/**
 * Getter for the recently granted permissions.
 * @return the recently granted permissions.
 */
public Set&lt;String&gt; getRecentlyGrantedPermissions() {
    return recentlyGrantedPermissions;
}

/**
 * Getter for the recently denied permissions.
 * @return the recently denied permissions.
 */
public Set&lt;String&gt; getRecentlyDeniedPermissions() {
    return recentlyDeniedPermissions;
}
}</code></pre><ul>
<li>2&#x3001;&#x5982;&#x4F55;&#x4F7F;&#x7528;&#x5462;&#xFF1F;</li>
</ul>
<p> 1&#xFF09;&#x3001;&#x521D;&#x59CB;&#x5316;Facebook</p>
<pre><code>FaceBookLoginManager.getInstance().initFaceBook(this,
            new OnLoginSuccessListener() {
                @Override
                public void onSuccess(LoginResult result) {

                }

                @Override
                public void onError(FacebookException ex) {

                }

                @Override
                public void onCancel() {

                }

            });</code></pre><p>  2)&#x3001;&#x8BBE;&#x7F6E;&#x56DE;&#x8C03;</p>
<pre><code>/**
 * &#x8BBE;&#x7F6E;&#x767B;&#x5F55;&#x7ED3;&#x679C;&#x56DE;&#x8C03;
 *
 * @param requestCode &#x8BF7;&#x6C42;&#x7801;
 * @param resultCode  &#x7ED3;&#x679C;&#x7801;
 * @param data        &#x6570;&#x636E;
 */
public void setOnActivityResult(int requestCode, int resultCode, Intent data) {
    if (mFaceBookCallBack != null) {
        mFaceBookCallBack.onActivityResult(requestCode, resultCode, data);
    }
}</code></pre><p>3&#xFF09;&#x3001;&#x8C03;&#x7528;&#x767B;&#x5F55;</p>
<pre><code>mBtnSend=findViewById(R.id.btn_send);
mBtnSend.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
     FaceBookLoginManager.getInstance().faceBookLogin(MainActivity.this);
    }
});</code></pre><h3 id="&#x6700;&#x540E;"><a href="#&#x6700;&#x540E;" class="headerlink" title="&#x6700;&#x540E;"></a>&#x6700;&#x540E;</h3><pre><code>&#x5230;&#x6B64;&#xFF0C;Facebook&#x7684;&#x767B;&#x5F55;&#x5C31;&#x5B8C;&#x6210;&#x4E86;&#xFF0C;&#x5F53;&#x7136;&#xFF0C;&#x4E0A;&#x9762;&#x7684;&#x5DE5;&#x5177;&#x7C7B;&#x8FD8;&#x53EF;&#x4EE5;&#x8FDB;&#x4E00;&#x6B65;&#x5C01;&#x88C5;&#xFF0C;&#x5E76;&#x4E14;&#x6574;&#x7406;&#x6210;&#x4E00;&#x4E2A;&#x5728;&#x7EBF;&#x4F9D;&#x8D56;&#x5E93;&#x3002;</code></pre><p>&#x5982;&#x679C;&#x4F60;&#x5BF9;&#x6253;&#x5305;&#x6210;&#x5728;&#x7EBF;&#x4F9D;&#x8D56;&#x5E93;&#x4E0D;&#x592A;&#x719F;&#x7684;&#x8BDD;&#xFF0C;&#x5EFA;&#x8BAE;&#x4F60;&#x53BB;&#x770B;&#x6211;&#x7684;&#x53E6;&#x4E00;&#x7BC7;&#x6587;&#x7AE0;<a href="https://www.jianshu.com/p/d287db9fae38" target="_blank" rel="noopener">Android &#x53D1;&#x5E03;&#x9879;&#x76EE;&#x5230;jitpack&#x8BE6;&#x89E3;</a>&#x3002;</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/07/17/SDK支付接入说明/" rel="next" title="SDK支付接入说明">
                <i class="fa fa-chevron-left"></i> SDK支付接入说明
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2019/07/17/Git用法初探/" rel="prev" title="Git用法初探">
                Git用法初探 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Silence潇湘夜雨</p>
              <p class="site-description motion-element" itemprop="description">Android开发一枚</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">55</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">16</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/muyishuangfeng" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.jianshu.com/u/1e2eec6f972c" target="_blank" title="简书">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>简书</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://juejin.im/user/58df0abf61ff4b006b115e43" target="_blank" title="掘金">
                      
                        <i class="fa fa-fw fa-star"></i>掘金</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://twitter.com/yangke20792452" target="_blank" title="Twitter">
                      
                        <i class="fa fa-fw fa-twitter"></i>Twitter</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#前言："><span class="nav-number">1.</span> <span class="nav-text">前言：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#首先"><span class="nav-number">2.</span> <span class="nav-text">首先</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#其次"><span class="nav-number">3.</span> <span class="nav-text">其次</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#最后"><span class="nav-number">4.</span> <span class="nav-text">最后</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Silence潇湘夜雨</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">114.8k</span>
  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

  <!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/love.js"></script>
<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"model":{"scale":1,"hHeadPos":0.5,"vHeadPos":0.618},"display":{"superSample":2,"width":150,"height":300,"position":"right","hOffset":0,"vOffset":-20},"mobile":{"show":false},"react":{"opacityDefault":0.5,"opacityOnHover":0.5},"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
